package com.fr.privilege.filter.core;

import com.fr.base.FRContext;
import com.fr.base.Inter;
import com.fr.privilege.authentication.Authentication;
import com.fr.privilege.authentication.AuthenticationFactory;
import com.fr.web.platform.PlatformControl;
import com.fr.web.platform.PlatformManager;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class PlatformAccessDealWith
{
  public static void dealWithRequest(String paramString, HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse)
    throws Exception
  {
    Authentication localAuthentication = AuthenticationFactory.extractAuthentication(paramHttpServletRequest);
    PlatformControl localPlatformControl = FRContext.getPlatformManager().getPlatformControl();
    if (!(localPlatformControl.access(localAuthentication)))
      throw new Exception(Inter.getLocText("Privilege-No_Authentication"));
  }
}